package com.fresh.service.impl;

import java.util.List;

import javax.annotation.Resource;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fresh.dao.UserPermissionDao;
import com.fresh.entity.UserPermissionEntity;
import com.fresh.service.UserPermissionService;



@Transactional
@Service("iUserPermissionService")
public class UserPermissionServiceImpl implements UserPermissionService{


	@Resource
	private UserPermissionDao userPermissionDao;


	@Override
	public List<UserPermissionEntity> getUserPermissionByUserId(String userId) {
		// TODO Auto-generated method stub
		return userPermissionDao.getUserPermissionByUserId(userId);
	}
	
	@Override
	public List<UserPermissionEntity>  queryUser(String userId, Integer type) {
		UserPermissionEntity  entity = new UserPermissionEntity();
		entity.setUserId(userId);
		entity.setType(type);
		return  userPermissionDao.queryUser(entity);
		
	}
	

}
